<template>

    <el-dialog
            title=""
            center=""
            width="20%"
            :close-on-click-modal='false'
            :before-close="handleClose"
            :visible.sync="diyDeleteDialogVisible">
        <el-row style="font-size: 16px;">
            <el-col align="center">
                <span>确认删除</span>

            </el-col>
        </el-row>
        <span slot="footer" class="dialog-footer">
    <el-button @click="cancel" size="medium">取 消</el-button>
    <el-button type="primary" @click="deleteEnter" size="medium">确 定</el-button>
  </span>
    </el-dialog>

</template>

<script>
    export default {
        name: "deleteDialog",
        props: ['deleteDialogVisible'],

        methods: {
            handleClose() {
                this.$emit('cancel')
            },
            deleteEnter() {
                this.$emit('handleFun')
            },
            cancel() {
                this.$emit('cancel')
            },
        },
        computed: {
            diyDeleteDialogVisible: {
                get: function () {
                    return this.deleteDialogVisible
                },
                set: function () {        //勿删

                }
            },
        },
    }
    /*使用示例*/
    /*
    <el-button @click="myDeleteDialogVisible=true" >删除</el-button>
   绑定两个自定义时间和一个自定义属性
        <deleteDialog :deleteDialogVisible="myDeleteDialogVisible" @handleFun="myFun" @cancel="cancel"></deleteDialog>
    /!*方法*!/
    data(){
        return {
                myDeleteDialogVisible: false,
                }
            },
    methods:{
        myFun(){
            this.myDeleteDialogVisible=false
            //下方写业务代码
            console.log('myFun');
        },
        cancel(){
            this.myDeleteDialogVisible=false
        },
    },*/

</script>


<style scoped>

</style>